{extend name="shop/showstore/common/store_layout" /}
{block name="content"}

<?php 
//加载店铺装修静态页
if(isset($decoration_file)) { 
    require($decoration_file);
} 
?>
<?php if(!$store_decoration_only) {?>
<div class="wrapper" style="width:100%; margin:0 auto; text-align:center">
	<div class="flexslider">
      <ul class="slides">
        <?php if(!empty($store_slide) && is_array($store_slide)){?>
        <?php for($i=0;$i<5;$i++){?>
        <?php if($store_slide[$i] != ''){?>
        <li><a style="background: url('__UPLOAD_PATH__/shop/store/slide/{$store_slide[$i]}') no-repeat center center;" <?php if($store_slide_url[$i] != '' && $store_slide_url[$i] != 'http://'){?>href="<?php echo $store_slide_url[$i];?>"<?php }?>></a></li>
        <?php }?>
        <?php }?>
        <?php }else{?>        
        <li><a style="background:url('__UPLOAD_PATH__/shop/store/slide/f01.jpg') no-repeat center center;" href="javascript:;"></a></li>
        <li><a style="background: url('__UPLOAD_PATH__/shop/store/slide/f02.jpg') no-repeat center center;" href="javascript:;"></a></li>
        <li><a style="background: url('__UPLOAD_PATH__/shop/store/slide/f03.jpg') no-repeat center center;" href="javascript:;"></a></li>
        <li><a style="background: url('__UPLOAD_PATH__/shop/store/slide/f04.jpg') no-repeat center center;" href="javascript:;"></a></li>
        <?php }?>
      </ul>
    </div>
</div>  

<div style="min-width: 1200px; width: 100%;">
	
	
<div id="line3">
	<!--背景图一-->
	<?php if(!empty($store_bg[0])){?>
		<img src="__UPLOAD_PATH__/shop/store/slide/{$store_bg[0]}">
	<?php }else{?>
		<img src="__SHOP_DEFAULT__/store/style/style2/images/cha2-3.png">
	<?php }?>
				
	
</div>
	
<ul id="list4">
	{volist name="town_goods_list" id="vo" length='2'}
		<li class="one">
			<a href="{:url('shop/Goods/index',array('goods_id'=>$vo['goods_id']))}" title="{$vo['goods_name']}">
				<img src="{:cthumb($vo['goods_image'], 360,$vo['store_id'])}">
			</a>
		</li>
	{/volist}
</ul>
<ul id="list5">
	{volist name="town_goods_list" id="vo" offset="2" length='2'}
		<li class="one">
			<a href="{:url('shop/Goods/index',array('goods_id'=>$vo['goods_id']))}" title="{$vo['goods_name']}">
				<img src="{:cthumb($vo['goods_image'], 360,$vo['store_id'])}">
			</a>
		</li>
	{/volist}
</ul>	
		
<div id="line1">
	<!--背景图二-->
	<?php if(!empty($store_bg[1])){?>
		<img src="__UPLOAD_PATH__/shop/store/slide/{$store_bg[1]}">
	<?php }else{?>
		<img src="__SHOP_DEFAULT__/store/style/style2/images/cha2-8.png">
	<?php }?>
	
	<?php if(!empty($store_adv[0])){?>
		<a href="{$store_adv_url[0]}">
			<img src="__UPLOAD_PATH__/shop/store/slide/{$store_adv[0]}">
		</a>
	<?php }else{?>
		<a href="#">
			<img src="__SHOP_DEFAULT__/store/style/style2/images/cha2-9.png">
		</a>
	<?php }?>
</div>
<ul id="list2">
	{volist name="new_goods_list" id="vo" length='3'}
		<li class="left">
			<a href="{:url('shop/Goods/index',array('goods_id'=>$vo['goods_id']))}" title="{$vo['goods_name']}">
				<img src="{:cthumb($vo['goods_image'], 360,$vo['store_id'])}">
				<p class="p1"><nobr>{$vo['goods_name']}</nobr></p>
				<p class="p2"><nobr>{$vo['goods_jingle']}</nobr></p>
				<p class="p3">抢购价<span class="span1">￥</span><span class="span2">{$vo['goods_promotion_price']}</span>	<button>立即购买</button></p>
			</a>
		</li>
	{/volist}
</ul>
<div id="line2">
	<!--背景图三-->
	<?php if(!empty($store_bg[2])){?>
		<img src="__UPLOAD_PATH__/shop/store/slide/{$store_bg[2]}">
	<?php }else{?>
		<img src="__SHOP_DEFAULT__/store/style/style2/images/cha2-10.jpg">
	<?php }?>
	
</div>
<ul id="list3">
	{volist name="recommended_goods_list" id="vo" length='2'}
		<li class="left">
			<a href="{:url('shop/Goods/index',array('goods_id'=>$vo['goods_id']))}" title="{$vo['goods_name']}">
				<img src="{:cthumb($vo['goods_image'], 360,$vo['store_id'])}">
				<p class="p1">{$vo['goods_name']}<span>{$vo['goods_jingle']}</span></p>
				<p class="list3-line"></p>
				<ul class="p2">
					<li class="p4">活动惊喜价￥<span class="span1">{$vo['goods_promotion_price']}</span></li>
					<li class="p3">
						
						<h6  style="margin-top: 12px;color: red;" class="h6">点击查看</h6>
					</li>
				</ul>
			</a>
		</li>
	{/volist}
</ul>
  
</div>
		


<!-- 引入幻灯片JS --> 
<script type="text/javascript" src="__SITE_RESOURCE__/js/jquery.flexslider-min.js"></script> 
<!-- 绑定幻灯片事件 --> 
<script type="text/javascript">
	$(window).load(function() {
		$('.flexslider').flexslider();


	    // 图片切换效果
	    $('.goods-thumb-scroll-show').find('a').mouseover(function(){
	        $(this).parents('li:first').addClass('selected').siblings().removeClass('selected');
	        var _src = $(this).find('img').attr('src');
	        _src = _src.replace('_60.', '_240.');
	        _src = _src.replace('-60', '-240');
	        $(this).parents('dt').find('.goods-thumb').find('img').attr('src', _src);
	    });
	});
</script>
<?php } ?>
	
{/block}
